<template>
  <div>
    <v-header :menu="menu" :login="login"/>
    <Sidebar ref="sidebar"></Sidebar>
    <v-body/>
  </div>
</template>

<script>
  import Sidebar from './components/Sidebar'
  import Body from './components/Body'
  import header from '@/components/header'
  export default {
    name: 'appCenter',
    components: {
      Sidebar,
      'v-body': Body,
      'v-header': header
    },
    data () {
      return {
        menu: true,
        login: true
      }
    },
    beforeRouteUpdate (to, from, next) {
      this.$nextTick(() => {
        this.$refs.sidebar.update(to)
      })
      next()
    }
  }
</script>
